<template>
	<view>
		<view class="title">
			{{title}}
		</view>
		
		<view class="trunover">
			<view class="trunoveritem" v-for="(item , index) in turnovers" :key="index" @click="itemClick(item)">
				<view class="item_left">
					<view class="reson">
						{{item.reson}}
					</view>
					<view class="trunovertime" >
						{{item.createtime}}
					</view>
				</view>
				<view class="item_right" :style="{'color':accountColor}">
					{{item.money}}
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			turnovers: Array,
			title:String,
			accountColor:String
		},
		data() {
			return {
				
			};
		},
		methods:{
			itemClick(item){
				
				this.$emit('eventClick',item)
			}
		}
	}
</script>

<style lang="scss">
.title{
		margin-bottom: 32rpx;
		padding-left:24rpx;
		font-size: 32rpx;
		border-left: 6rpx solid $themLight;
	}
	.trunoveritem{
		padding: 20rpx;
		border-top: 2rpx solid #ccc;
		@extend %flexBetw;
		
		.item_left{
			@extend %flexBetw;
			align-items: flex-start;
			flex-direction: column;
			height: 80rpx;
			font-size: 26rpx;
			
			.trunovertime{
				color: #acacac;
			}
		}
		.item_right{
			font-weight: bold;
			font-size: 48rpx;
	
		}
	}
</style>
